@page "/DensityHeatmap_Chart"
@inject NavigationManager NavigationManager
@inject HttpClient HttpClient

<Tabs>
    <TabPane Key="1">
        <Tab>示例1</Tab>
        <ChildContent>
            <DensityHeatmap @ref="chart1" Data="data1" Config="config1" />
        </ChildContent>
    </TabPane>
</Tabs>

@code{

    IChartComponent chart1;
    JobpayingItem[] data1;

    protected override async Task OnInitializedAsync()
    {
         data1 = await DemoData.JobpayingItemAsync(NavigationManager, HttpClient);
        await chart1.ChangeData(data1);

        await base.OnInitializedAsync();
    }


    #region 示例1

    DensityHeatmapConfig config1 = new DensityHeatmapConfig()
    {
        XField = "prob",
        YField = "average_annual_wage",
        ColorField = "numbEmployed",
        Color = new string[] { "#295599", "#3e94c0", "#78c6d0", "#b4d9e4", "#fffef0", "#f9cdac", "#ec7d92", "#bc448c" },
        Radius = 15,
        Intensity = 2,
        XAxis = new Axis()
        {
            Visible = true,
            Min = -0.05,
            Max = 1.05,
            Nice = false,
        },
        YAxis = new Axis()
        {
            Visible = true,
            Min = -1000,
        },
    };


    #endregion 示例1

}

